package com.commerce.common.constant;

/**
 * RabbitMQ 常量类
 */
public class RabbitMQConstant {

    /**
     * 产品服务交换机
     */
    public static final String PRODUCT_EXCHANGE = "product.exchange";

    /**
     * 产品服务请求队列
     */
    public static final String PRODUCT_REQUEST_QUEUE = "product.request.queue";

    /**
     * 产品服务响应队列
     */
    public static final String PRODUCT_RESPONSE_QUEUE = "product.response.queue";

    /**
     * 产品服务请求路由键
     */
    public static final String PRODUCT_REQUEST_ROUTING_KEY = "product.request";

    /**
     * 产品服务响应路由键
     */
    public static final String PRODUCT_RESPONSE_ROUTING_KEY = "product.response";

    // ==================== 秒杀相关常量 ====================

    /**
     * 秒杀交换机
     */
    public static final String FLASH_SALE_EXCHANGE = "flash.sale.exchange";

    /**
     * 秒杀订单队列
     */
    public static final String FLASH_SALE_ORDER_QUEUE = "flash.sale.order.queue";

    /**
     * 秒杀订单死信队列
     */
    public static final String FLASH_SALE_ORDER_DLQ = "flash.sale.order.dlq";

    /**
     * 秒杀库存回滚队列
     */
    public static final String FLASH_SALE_STOCK_ROLLBACK_QUEUE = "flash.sale.stock.rollback.queue";

    /**
     * 秒杀订单路由键
     */
    public static final String FLASH_SALE_ORDER_ROUTING_KEY = "flash.sale.order";

    /**
     * 秒杀库存回滚路由键
     */
    public static final String FLASH_SALE_STOCK_ROLLBACK_ROUTING_KEY = "flash.sale.stock.rollback";

    /**
     * 秒杀订单延迟队列
     */
    public static final String FLASH_SALE_ORDER_DELAY_QUEUE = "flash.sale.order.delay.queue";

    /**
     * 秒杀订单延迟路由键
     */
    public static final String FLASH_SALE_ORDER_DELAY_ROUTING_KEY = "flash.sale.order.delay";

    /**
     * 秒杀订单超时时间（毫秒）- 15分钟
     */
    public static final long FLASH_SALE_ORDER_TIMEOUT = 15 * 60 * 1000;
}